<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="zh">
<head>
    <title>PAD管理</title>
    <jsp:include page="/WEB-INF/view/commons/css.jsp" />
</head>
<body >
<div id="main-container" class="container-fluid">
    <form  action="bizPadManagement/${action eq "create" ?"save":"update"}" name="inputForm" id="inputForm" method="post" class="form-horizontal">
    <input name="id" id="id" value="${entity.id}" type="hidden" />
    <div class="form-group">
        <label class="col-sm-1 control-label">设备编号：</label>
        <div class="col-md-4">
            <input type="text" class="form-control" name="deviceId" value="${entity.deviceId}" placeholder="设备编号">
        </div>
        <label class="col-sm-1 control-label">初次绑定客户端编号：</label>
        <div class="col-md-4">
            <input type="text" class="form-control" name="firstClientId" value="${entity.firstClientId}" placeholder="初次绑定客户端编号">
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-1 control-label">绑定时间：</label>
        <div class="col-md-4">
            <input type="text" class="form-control" name="bindTime" value="${entity.bindTime}" placeholder="绑定时间">
        </div>
        <label class="col-sm-1 control-label">证书编号：</label>
        <div class="col-md-4">
            <input type="text" class="form-control" name="certNumber" value="${entity.certNumber}" placeholder="证书编号">
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-1 control-label">当前使用客户端：</label>
        <div class="col-md-4">
            <input type="text" class="form-control" name="useClientId" value="${entity.useClientId}" placeholder="当前使用客户端">
        </div>
        <label class="col-sm-1 control-label">最近使用时间：</label>
        <div class="col-md-4">
            <input type="text" class="form-control" name="lastUserTime" value="${entity.lastUserTime}" placeholder="最近使用时间">
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-1 control-label">状态：</label>
        <div class="col-md-4">
            <input type="text" class="form-control" name="status" value="${entity.status}" placeholder="状态">
        </div>
    </div>
    <div class="form-group">
        <div class="col-sm-offset-1 col-sm-2">
            <button id="saveBtn" type="submit" class="btn btn-sm btn-primary"><i class="fa fa-floppy-o"></i> 提交</button>
            <button type="button" class="btn btn-sm link_close"><i class="fa fa-close"></i> 关闭</button>
        </div>
    </div>
    </form>
</div><!--/#main-container-->

<!-- script start -->
<jsp:include page="/WEB-INF/view/commons/js.jsp" />
<script type="text/javascript">
    $(document).ready(function(e) {
        var options = {
            rules:{
                deviceId : { required : true, maxlength : 50 },
                firstClientId : { required : true, maxlength : 50 },
                bindTime : { required : true },
                certNumber : { required : true, maxlength : 50 },
                useClientId : { required : true, maxlength : 50 },
                lastUserTime : { required : true },
                status : { required : true, maxlength : 2 }
            },
            submitHandler:function(form){
                $(form).ajaxSubmit({
                    type:'post',
                    dataType:'json',
                    success:function(data){
                        if(data.success){
                            $('#searchBtn', parent.document).click();
                            closeIframe();
                        }else{
                            layer.alert(data.msg);
                        }
                    }
                });
            }
        };
        $("#inputForm").validate(options);
    });
</script>
<!-- script end -->
</body>
</html>
